<template>
  <div class="my_div">
    <img :src="img" alt="" />
    <p :style="{ backgroundColor: colorStr }" >{{ dogname }}</p>
  </div>
</template>

<script>
export default {
  props: ['img', 'dogname'],
  data() {
    return {
      colorStr: '',
    }
  },
  methods: {

  },
}
</script>

<style scoped>
.my_div {
  width: 200px;
  border: 1px solid black;
  text-align: center;
  float: left;
}

.my_div img {
  width: 100%;
  height: 100%;
}
</style>
